package com.kuizii.jarencrypt;

import com.kuizii.jarencrypt.util.EncryptUtil;

import java.io.File;

public class AppStarter {

    static String encryptClassPath = System.getProperty("user.dir")+"\\demo-decrypt\\target\\classes";
    static String securityKey = "__wwW.kuizIi.CoM";

    //arg[0]  加密文件夹所在根目录
    //arg[1]  密钥
    //arg[2]...arg[n]  排除类
    public static void main(String... args) {

        if (args.length > 0) {
            System.out.println(args[0]);
            encryptClassPath = args[0];
            securityKey=args[1];
        }

        File file = new File(encryptClassPath);
        try {
            EncryptUtil.EncryptClass(file, securityKey);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("加密完成");
    }


}
